<?php
class Mozg_Collection_Layouts extends Mozg_Collection
{
    /**
		задаем имя класса объектов коллекции
     */
    protected $_itemClassName = 'Mozg_Layout';
    protected static $_instance;
    
    static public function GetInstance ()
    {
        if (! (self::$_instance instanceof self)) self::$_instance = new self();
        return self::$_instance;
    }
    
    public function Get($moduleName)
    {
        $layoutClassName = $this->GetClassName($moduleName);
        return new $layoutClassName();
    }
    
    public function IsExists($moduleName)
    {
        return class_exists($this->GetClassName($moduleName));
    }
    
    protected function GetClassName($moduleName)
    {
    	return 'App_Module_' .$moduleName. '_Layout';
    }
}